1. Field of the Invention
A certain aspect of the present invention relates to an electronic apparatus and a storage medium containing program code.
2. Description of the Related Art
Universal serial bus (USB) interfaces are widely used to connect electronic apparatuses such as an image forming apparatus and host devices (external devices). Meanwhile, there is a known technology to monitor whether a host device is connected to a USB interface of an image forming apparatus and to turn off the power of the image forming apparatus or one or more modules of the image forming apparatus when no host device is connected to the USB interface.
For example, patent document 1 discloses a USB device including a detection unit for detecting a supply voltage from a host device and controlling power supply to components of the USB device based on the detection result to reduce power consumption of the USB device while it is not being used. If no supply voltage from the host device is detected, the detection unit turns off or reduces power supplied to the components of the USB device.
If no host device is connected to the USB interface of an image forming apparatus, no print request is sent to the image forming apparatus via the USB interface. In other words, it may mean that the image forming apparatus is not in use and the power of the image forming apparatus can be turned off. Automatically turning off the power to an image forming apparatus when it is not in use makes it possible to reduce power consumption and to save the user the trouble of having to press the power button of the image forming apparatus.
Meanwhile, networks such as a LAN are also widely used to connect image forming apparatuses and host devices. For this reason, an image forming apparatus normally includes multiple communication interfaces. Here, if the power of an image forming apparatus including a USB interface and other communication interfaces is automatically turned off as described above just because no host device is connected to the USB interface, host devices connected to the image forming apparatus via the other communication interfaces become unable to use the image forming apparatus. For example, if the power of an image forming apparatus connected to a first host device via a USB interface and to other host devices via a network is turned off when the first host device is disconnected, the other host devices become unable to use the image forming apparatus.    [Patent document 1] Japanese Patent Application Publication No. 11-305880